//
//  LBFadeImageLoopView.h
//  LBFadeImageLoopView
//
//  Created by Apple on 2021/9/19.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class LBFadeImageLoopView;

@protocol LBFadeImageLoopViewDelegate <NSObject>

@optional

///点击第in dex 张图片
- (void)fadeLoopView:(LBFadeImageLoopView *)fadeLoopView    clickItemAtIndex:(NSInteger)index;

@end

@interface LBFadeImageLoopView : UIView

/// 停留时间, 默认三秒
@property (nonatomic, assign) CGFloat stayTimeInterval;
/// 渐隐动画时间， 默认一秒
@property (nonatomic, assign) CGFloat fadeTime;

///当前正在展示的图片序号
@property (nonatomic, assign, readonly) NSInteger index;

@property (nonatomic, weak) id <LBFadeImageLoopViewDelegate> delegate;

///使用url 展示
- (void)loadWithimagUrls:(NSArray <NSString *> *)urls;

///使用image 展示
- (void)loadWithImages:(NSArray <UIImage *> *)images;

- (void)pause;

- (void)reStartTimer;

- (void)stopTimer;

@end

NS_ASSUME_NONNULL_END
